import types


class Person:
    pass


person = Person()
# 动态添加属性
person.nickname = '李昊哲'
print(person.nickname)


def eat(self):
    print('吃吃吃')


person.eat = types.MethodType(eat, person)
person.eat()
